package com.example.mysql.zendesk.listener;

import com.example.mysql.zendesk.framework.BinaryLogClientBean;
import com.github.shyiko.mysql.binlog.BinaryLogClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import java.io.IOException;

@SpringBootApplication
public class Boot {

    public static void main(String[] args) throws IOException {
        SpringApplication.run(Boot.class, args);
    }

    @Bean
    public BinaryLogClientBean binaryLogClientBean() {
        BinaryLogClient client = new BinaryLogClient("localhost", 3306, "demo", "123456");
        return new BinaryLogClientBean(client);
    }

}
